home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 August / Ahoy_Magazine_87-08_1987_Double_L_Side_A.d64 / Short Sort 2 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  417b  |  13 lines

  1. 0 print"[147]":poke53280,12:poke53281,12:poke646,0
  2. 1 rem ==================================
  3. 2 rem    commodares problem #40-2 :
  4. 3 rem       short sort
  5. 4 rem    solution by
  6. 5 rem       walter deuchler jr.
  7. 6 rem ==================================
  8. 10 mx=99 : dim a(mx) :rem max. integer
  9. 20 nm=10             :rem # terms
  10. 30 for j=1 to nm : x = int(rnd(0)*100) : a(x)=a(x)+1 : next
  11. 40 for j=0 to mx : t=a(j) :if t then for k=1 to t : print j; : next k
  12. 50 next j
  13.